<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<fmt:setLocale value="${currentClientLocale}"/>
<fmt:setBundle basename="my/engine/resources/resources"/>


<c:if test="${isUserAdmin}">
    <a href="${pageContext.request.contextPath}/public/uk/publish?action=logout">Logout</a>
</c:if>

<c:if test="${!isUserAdmin}">
    <div id="loginText"
         onclick="document.getElementById('loginForm').style.display = ''; document.getElementById('loginText').style.display = 'none'; document.getElementById('loginShowText').style.display = ''">
        <font size="3px">Login</font>
    </div>
    <div id="loginShowText" style="display:none;"
         onclick="document.getElementById('loginForm').style.display = 'none'; document.getElementById('loginText').style.display = ''; document.getElementById('loginShowText').style.display = 'none'">
        <font size="3px">Hide</font>
    </div>
    <span id="loginForm" style="display:none;">
    
        <form action="${pageContext.request.contextPath}/public/uk/publish" method="post">
            <table>
                <tr>
                    <td>
                        Login:
                    </td>
                    <td>
                        <input type="text" name="login"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        Password:
                    </td>
                    <td>
                        <input type="password" name="passwd"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="hidden" name="action" value="login"/>
                        <input type="submit"/>
                    </td>
                </tr>
            </table>
        </form>

    </span>
</c:if>